<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>upload file</title>
        <link href="../../script/seminar.css" rel="stylesheet">
        <script type="text/javascript">
            function fnUpload() {
                document.uploadFileForm.enctype = "multipart/form-data";
                document.uploadFileForm.method = 'POST';
                document.uploadFileForm.action = '../../logic/FileUpload.php';
                document.uploadFileForm.submit();
            }
            function fnClose() {
                window.returnValue = 1;
                var vWinOpener = window.opener;
                vWinOpener.fnRefresh();
                self.close();
            }
        </script>
    </head>
    <body>
        <?php
        include("../../utility/connection.php");
        include("../../utility/general.php");
        include("../../model/mSeminar.php");
        session_start();
        if (isset($_SESSION['arrResult'])) {
            $arrResult = $_SESSION['arrResult'];
        ?>
        <form name="uploadFileForm" id="uploadFileForm">
        <table border="0" width="100%" height="100%">
            <tr valign="middle">
                <td align="center">
                    
                    <table width="100%" border="0" cellpadding="2" cellspacing="0">
                        <tr>
                            <td>
                                <table width="100%" border="0" cellpadding="5" cellspacing="0">
                                    <tr class="tbl-header">
                                        <td colspan="3">UPLOAD FILE</td>
                                    </tr>
                                    <tr>
                                        <td>Title</td>
                                        <td>&nbsp;:&nbsp;</td>
                                        <td><input type="text" name="txtTitle" id="txtTitle" style="width: 500px;"></td>
                                    </tr>
                                    <tr>
                                        <td>Uraian</td>
                                        <td>&nbsp;:&nbsp;</td>
                                        <td>
                                            <textarea name="txtUraian" id="txtUraian" rows="5" cols="60"></textarea>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>File</td>
                                        <td>&nbsp;:&nbsp;</td>
                                        <td><input type="file" name="txtFile" id="txtFile"></td>
                                    </tr>
                                    <tr class="tbl-header">
                                        <td colspan="3">
                                            <button type="button" name="btUpload" id="btUpload" onclick="fnUpload()">Upload</button>
                                            <button type="button" name="btClose" id="btClose" onclick="fnClose()">Tutup</button>
                                        </td>
                                    </tr>
                                </table>
                                <?php
                                if (isset($_SESSION['uploadMessage'])) {
                                    $uploadMessage = $_SESSION['uploadMessage'];
                                    echo $uploadMessage;
                                }
                                ?>
                            </td>
                        </tr>
                    </table>
                    
                </td>
            </tr>
        </table>
        </form>
        <?php
        }
        ?>
    </body>
</html>
